package com.mcxx.modules.miniSalvation.order.service.write;

import com.mcxx.common.exception.BizException;
import com.mcxx.modules.miniSalvation.order.dao.read.StandardHistoryReadDao;
import com.mcxx.modules.miniSalvation.order.dao.write.StandardHistoryWriteDao;
import com.mcxx.modules.miniSalvation.order.entity.StandardHistoryEntity;
import com.mcxx.util.Constant;
import com.mcxx.util.FailureCode;
import com.yinhai.ta404.core.transaction.annotation.TaTransactional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
@TaTransactional
public class StandardHistoryWriteService {
    @Autowired
    private StandardHistoryWriteDao standardHistoryWriteDao;
    @Autowired
    private StandardHistoryReadDao standardHistoryReadDao;


    public int insertIgnoreNull(StandardHistoryEntity standardEntity) {
        return standardHistoryWriteDao.insertIgnoreNull(standardEntity);
    }


    public int insertList(List<StandardHistoryEntity> standardHistoryList){
        return standardHistoryWriteDao.insertList(standardHistoryList);
    }


    public int update(StandardHistoryEntity standardEntity) {
        return standardHistoryWriteDao.update(standardEntity);
    }


    public int updateIgnoreNull(StandardHistoryEntity standardEntity) {
        return standardHistoryWriteDao.updateIgnoreNull(standardEntity);
    }


    public int deleteStandardHisByWelfareId(String welfareId) {
        return standardHistoryWriteDao.deleteStandardHisByWelfareId(welfareId);
    }

}
